/*
 * control_center.cpp
 *
 *  Created on: Mar 30, 2010
 *      Author: root
 */
#include "CCS_include.hpp"
#include "control_center.hpp"
#include "read_config_xml.hpp"
#include <pthread.h>
#include <unistd.h>
void* mythread1(void* arg)
{
	while (1)
	{
		printf("ok\n");
	    //sleep(1);
	}
}
control_center::control_center()
{
	pthread_t id1;
	camera_control_switch_cmd testcmd;
	int ret=0;
	if (read_config_xml()==false)      //read from config.xml
	{
		my_printf("read config.xml error\n");
	}
	else
	{
		my_printf("read from config.xml over\n");
		testcmd=CAMERA_SWITCH;
		camera_ptz_switch(3,testcmd,22,10,10);
	//	ret=pthread_create(&id1,NULL,mythread1,NULL);
		if (ret)
		{
			printf("Error \n");
		}
	}
}


control_center * cctv_control_center;
unsigned char system_start(void)
{
	cctv_control_center = new control_center;
	//start watch dog form here.
  //  pause();
	return 0;
}






